@echo off

if '%1'=='help' goto help
if '%1'=='clean' goto clean
if '%1'=='cleanoutput' goto cleanoutput
if '%1'=='debug' goto debug
if '%1'=='release' goto release
if '%1'=='superclean' goto superclean

REM --------------------------------------
REM         Invalid argument
REM --------------------------------------

@echo Invaild argument for BUILD. Type 'build help' to show help messages.
goto end

REM --------------------------------------
REM         Valid arguments
REM --------------------------------------

:clean
call msbuild msbuild.proj /t:clean
goto end

:cleanoutput
call msbuild msbuild.proj /t:cleanoutput
goto end

:debug
call msbuild msbuild.proj /t:debug
goto end

:release
call msbuild msbuild.proj /t:release
goto end

:superclean
call msbuild msbuild.proj /t:superclean
goto end

REM --------------------------------------
REM         Help Message
REM --------------------------------------

:help

@echo.
@echo   Usage:  BULID [argument]
@echo.
@echo        clean           Clean the outputs files in C# project bin\Debug and bin\Release folders
@echo        cleanoutput     Clean the outputs files in {workroot}\bin folder
@echo        debug           Compile C# codes in Debug mode
@echo        help            Show help message of BUILD command
@echo        release         Compile codes in Release mode
@echo        superclean      Clean the outputs files in C# project bin\Debug and bin\Release folders and {workroot}\bin folder
@echo off
goto end

:end